      SUBROUTINE SETUP
      RETURN
      END
C   HS113
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      INTEGER J
      DOUBLE PRECISION X(NX),X0(10),A(10),FX
      SAVE A,X0
      DATA  A/3*1.D0, 4.D0,1.D0,2.D0,5.D0,7.D0, 2.D0, 1.D0/
      DATA X0/2*0.D0,10.D0,5.D0,3.D0,1.D0,0.D0,11.D0,10.D0,7.D0 /
      ICF=ICF+1
      FX=45.D0+X(1)*X(2)-14.D0*X(1)-16.D0*X(2)
      DO      100      J=1,10
      FX=FX+A(J)*(X(J)-X0(J))**2
  100 CONTINUE
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      INTEGER J
      DOUBLE PRECISION X(NX),GRADF(NX),X0(10),A(10)
      SAVE A,X0
      DATA  A/3*1.D0, 4.D0,1.D0,2.D0,5.D0,7.D0, 2.D0, 1.D0/
      DATA X0/2*0.D0,10.D0,5.D0,3.D0,1.D0,0.D0,11.D0,10.D0,7.D0 /
      ICGF=ICGF+1
      DO      100      J=1,10
      GRADF(J)= 2.D0*A(J)*(X(J)-X0(J))
 100  CONTINUE
      GRADF(1)=GRADF(1)+X(2)-14.D0
      GRADF(2)=GRADF(2)+X(1)-16.D0
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GXI
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      GOTO (100,200,300,400,500,600,700,800),I
  100 CONTINUE
      GXI=105.D0-4.D0*X(1)-5.D0 *X(2)+3.D0*X(7)-9.D0*X(8)
      RETURN
  200 CONTINUE
      GXI=-10.D0*X(1)+8.D0*X(2)+17.D0*X(7)-2.D0*X( 8)
      RETURN
  300 CONTINUE
      GXI=8.D0*X(1)-2.D0*X(2)-5.D0*X(9)+2.D0*X(10)+12.D0
      RETURN
  400 CONTINUE
      GXI=-3.D0*(X(1)-2.D0)**2-4.D0*(X(2)-3.D0)**2-2.D0*X(3)**2
     1    +7.D0*X(4)+120.D0
      RETURN
  500 CONTINUE
      GXI=-5.D0*X(1)**2-8.D0*X(2)-(X(3)-6.D0)**2+2.D0*X(4)+40.D0
      RETURN
  600 CONTINUE
      GXI=-(X(1)-8.D0)**2/2.D0-2.D0*(X(2)-4.D0)**2-3.D0*X(5)**2
     1              +X(6)+30.D0
      RETURN
  700 CONTINUE
      GXI=-X(1)**2-2.D0*(X(2)-2.D0)**2+2.D0*X(1)*X(2)-14.D0*X(5)
     1    +6.D0*X(6)
      RETURN
  800 CONTINUE
      GXI=3.D0*X(1)-6.D0*X(2)-12.D0*(X(9)-8.D0)**2+7.D0*X(10)
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J,K
      DOUBLE PRECISION X(NX),GRADGI(NX),B(10,3)
      SAVE B
      DATA B/-4.D0,-5.D0,4*0.D0,3.D0,-9.D0,2*0.D0,-10.D0,8.D0,
     1       4*0.D0,17.D0,-2.D0,2*0.D0,8.D0,-2.D0,6*0.D0,-5.D0,2.D0/
      IF(I .GT. 3)    GOTO 200
      DO     100      J=1,10
      GRADGI(J)=B(J,I)
  100 CONTINUE
      RETURN
  200 CONTINUE
      K=I-3
      DO      300      J=1,10
      GRADGI( J)=0.D0
  300 CONTINUE
      GOTO (400,500,600,700,800),K
  400 CONTINUE
      GRADGI(1)=-6.D0*(X(1)-2.D0)
      GRADGI(2)=-8.D0*(X(2)-3.D0)
      GRADGI(3)=-4.D0*X(3)
      GRADGI(4)= 7.D0
      RETURN
  500 CONTINUE
      GRADGI(1)=-10.D0*X(1)
      GRADGI(2)=-8.D0
      GRADGI(3)=-2.D0*(X(3)-6.D0)
      GRADGI(4)=2.D0
      RETURN
  600 CONTINUE
      GRADGI(1)=-X(1)+8.D0
      GRADGI(2)=-4.D0*(X(2)-4.D0)
      GRADGI(5)=-6.D0*X(5)
      GRADGI(6)=1.D0
      RETURN
  700 CONTINUE
      GRADGI( 1)=-2.D0*X(1)+2.D0*X(2)
      GRADGI(2)=-4.D0*(X(2)-2.D0)+2D0*X(1)
      GRADGI( 5)=-14.D0
      GRADGI( 6)=  6.D0
      RETURN
  800 CONTINUE
      GRADGI(1)=3.D0
      GRADGI(2)=-6.D0
      GRADGI( 9)=-24.D0*(X(9)-8.D0)
      GRADGI(10)= 7.D0
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I
      DATA NAME/'HS113'/
      DATA (X(I),I=1,10)
     F   /2.D0,3.D0,2*5.D0,1.D0,2.D0,7.D0,3.D0,6.D0,10.D0/
      DATA N/10/ , NH/0/ , NG/ 8/
      DATA DEL0/1.00D0/ ,TAU0/1.D4/ ,TAU/.1D0/
      DATA (GUNIT(1,I),I=0,8)/9*-1/,
     F     (GUNIT(2,I),GUNIT(3,I),I=0,8)/18*0/
      END
